package
{
	public class ProjCircle_Tile
	{
		public static var Proj_CircleTile:Object;

		public static function initialize():void
		{
			Proj_CircleTile = new Object();
			Proj_CircleTile[TileMapCell.CTYPE_FULL] = ProjCircle_Full;
			Proj_CircleTile[TileMapCell.CTYPE_45DEG] = ProjCircle_45Deg;
			Proj_CircleTile[TileMapCell.CTYPE_CONCAVE] = ProjCircle_Concave;
			Proj_CircleTile[TileMapCell.CTYPE_CONVEX] = ProjCircle_Convex;
			Proj_CircleTile[TileMapCell.CTYPE_22DEGs] = ProjCircle_22DegS;
			Proj_CircleTile[TileMapCell.CTYPE_22DEGb] = ProjCircle_22DegB;
			Proj_CircleTile[TileMapCell.CTYPE_67DEGs] = ProjCircle_67DegS;
			Proj_CircleTile[TileMapCell.CTYPE_67DEGb] = ProjCircle_67DegB;
			Proj_CircleTile[TileMapCell.CTYPE_HALF] = ProjCircle_Half;
		}

		public static function ResolveCircleTile(x, y, oH, oV, obj, t):Boolean
		{
			var _local1 = t;
			if (0 < _local1.ID)
			{
				return(Proj_CircleTile[_local1.CTYPE](x, y, oH, oV, obj, _local1));
			}
			return(false);
			return(_local1);
		}

		private static function ProjCircle_Full(x, y, oH, oV, obj, t):int
		{
			var _local1 = t;
			var _local2 = obj;
			if (oH == 0)
			{
				if (oV == 0)
				{
					if (x < y)
					{
						var dx = (_local2.pos.x - _local1.pos.x);
						if (dx < 0)
						{
							_local2.ReportCollisionVsWorld(-x, 0, -1, 0, _local1);
							return(CollisionType.COL_AXIS);
						}
						_local2.ReportCollisionVsWorld(x, 0, 1, 0, _local1);
						return(CollisionType.COL_AXIS);
					}
					var _local3 = _local2.pos.y - _local1.pos.y;
					if (_local3 < 0)
					{
						_local2.ReportCollisionVsWorld(0, -y, 0, -1, _local1);
						return(CollisionType.COL_AXIS);
					}
					_local2.ReportCollisionVsWorld(0, y, 0, 1, _local1);
					return(CollisionType.COL_AXIS);
				}
				Main.getInstance().static_rend.DrawCrossR(_local1.pos, _local1.xw);
				_local2.ReportCollisionVsWorld(0, y * oV, 0, oV, _local1);
				return(CollisionType.COL_AXIS);
			}
			else if (oV == 0)
			{
				Main.getInstance().static_rend.DrawCrossR(_local1.pos, _local1.xw);
				_local2.ReportCollisionVsWorld(x * oH, 0, oH, 0, _local1);
				return(CollisionType.COL_AXIS);
			}
			else
			{
				Main.getInstance().static_rend.DrawCrossR(_local1.pos, _local1.xw);
				var vx = (_local1.pos.x + (oH * _local1.xw));
				var vy = (_local1.pos.y + (oV * _local1.yw));
				var dx = (_local2.pos.x - vx);
				var _local3 = _local2.pos.y - vy;
				var len = Math.sqrt((dx * dx) + (_local3 * _local3));
				var pen = (_local2.r - len);
				if (0 < pen)
				{
					if (len == 0)
					{
						dx = oH / Math.SQRT2;
						_local3 = oV / Math.SQRT2;
					}
					else
					{
						dx = dx / len;
						_local3 = _local3 / len;
					}
					_local2.ReportCollisionVsWorld(dx * pen, _local3 * pen, dx, _local3, _local1);
					return(CollisionType.COL_OTHER);
				}
			}
			return(CollisionType.COL_NONE);
			return(_local3);
		}

		private static function ProjCircle_Half(x, y, oH, oV, obj, t):int
		{
			var _local1 = t;
			var _local2 = obj;
			var _local3 = oV;
			var signx = _local1.signx;
			var signy = _local1.signy;
			var celldp = ((oH * signx) + (_local3 * signy));
			if (0 < celldp)
			{
				return(CollisionType.COL_NONE);
			}
			else if (oH == 0)
			{
				if (_local3 == 0)
				{
					var r = _local2.r;
					var ox = ((_local2.pos.x - (signx * r)) - _local1.pos.x);
					var oy = ((_local2.pos.y - (signy * r)) - _local1.pos.y);
					var sx = signx;
					var sy = signy;
					var dp = ((ox * sx) + (oy * sy));
					if (dp < 0)
					{
						sx = sx * (-dp);
						sy = sy * (-dp);
						var lenN = Math.sqrt((sx * sx) + (sy * sy));
						var lenP = Math.sqrt((x * x) + (y * y));
						if (lenP < lenN)
						{
							_local2.ReportCollisionVsWorld(x, y, x / lenP, y / lenP, _local1);
							return(CollisionType.COL_AXIS);
						}
						_local2.ReportCollisionVsWorld(sx, sy, _local1.signx, _local1.signy);
						return(CollisionType.COL_OTHER);
					}
				}
				else if (celldp == 0)
				{
					var r = _local2.r;
					var dx = (_local2.pos.x - _local1.pos.x);
					if ((dx * signx) < 0)
					{
						_local2.ReportCollisionVsWorld(0, y * _local3, 0, _local3, _local1);
						return(CollisionType.COL_AXIS);
					}
					else
					{
						var dy = (_local2.pos.y - (_local1.pos.y + (_local3 * _local1.yw)));
						var len = Math.sqrt((dx * dx) + (dy * dy));
						var pen = (_local2.r - len);
						if (0 < pen)
						{
							if (len == 0)
							{
								dx = signx / Math.SQRT2;
								dy = _local3 / Math.SQRT2;
							}
							else
							{
								dx = dx / len;
								dy = dy / len;
							}
							_local2.ReportCollisionVsWorld(dx * pen, dy * pen, dx, dy, _local1);
							return(CollisionType.COL_OTHER);
						}
					}
				}
				else
				{
					_local2.ReportCollisionVsWorld(0, y * _local3, 0, _local3, _local1);
					return(CollisionType.COL_AXIS);
				}
			}
			else if (_local3 == 0)
			{
				if (celldp == 0)
				{
					var r = _local2.r;
					var dy = (_local2.pos.y - _local1.pos.y);
					if ((dy * signy) < 0)
					{
						_local2.ReportCollisionVsWorld(x * oH, 0, oH, 0, _local1);
						return(CollisionType.COL_AXIS);
					}
					else
					{
						var dx = (_local2.pos.x - (_local1.pos.x + (oH * _local1.xw)));
						var len = Math.sqrt((dx * dx) + (dy * dy));
						var pen = (_local2.r - len);
						if (0 < pen)
						{
							if (len == 0)
							{
								dx = signx / Math.SQRT2;
								dy = _local3 / Math.SQRT2;
							}
							else
							{
								dx = dx / len;
								dy = dy / len;
							}
							_local2.ReportCollisionVsWorld(dx * pen, dy * pen, dx, dy, _local1);
							return(CollisionType.COL_OTHER);
						}
					}
				}
				else
				{
					_local2.ReportCollisionVsWorld(x * oH, 0, oH, 0, _local1);
					return(CollisionType.COL_AXIS);
				}
			}
			else
			{
				var vx = (_local1.pos.x + (oH * _local1.xw));
				var vy = (_local1.pos.y + (_local3 * _local1.yw));
				var dx = (_local2.pos.x - vx);
				var dy = (_local2.pos.y - vy);
				var len = Math.sqrt((dx * dx) + (dy * dy));
				var pen = (_local2.r - len);
				if (0 < pen)
				{
					if (len == 0)
					{
						dx = oH / Math.SQRT2;
						dy = _local3 / Math.SQRT2;
					}
					else
					{
						dx = dx / len;
						dy = dy / len;
					}
					_local2.ReportCollisionVsWorld(dx * pen, dy * pen, dx, dy, _local1);
					return(CollisionType.COL_OTHER);
				}
			}
			return(CollisionType.COL_NONE);
			return(_local3);
		}

		private static function ProjCircle_45Deg(x, y, oH, oV, obj, t):int
		{
			var _local1 = t;
			var _local2 = obj;
			var signx = _local1.signx;
			var signy = _local1.signy;
			if (oH == 0)
			{
				if (oV == 0)
				{
					var sx = _local1.sx;
					var sy = _local1.sy;
					var ox = ((_local2.pos.x - (sx * _local2.r)) - _local1.pos.x);
					var _local3 = (_local2.pos.y - (sy * _local2.r)) - _local1.pos.y;
					var dp = ((ox * sx) + (_local3 * sy));
					if (dp < 0)
					{
						sx = sx * (-dp);
						sy = sy * (-dp);
						var lenP:Number;
						if (x < y)
						{
							lenP = x;
							y = 0;
							if ((_local2.pos.x - _local1.pos.x) < 0)
							{
								x = x * -1;
							}
						}
						else
						{
							lenP = y;
							x = 0;
							if ((_local2.pos.y - _local1.pos.y) < 0)
							{
								y = y * -1;
							}
						}
						var lenN = Math.sqrt((sx * sx) + (sy * sy));
						if (lenP < lenN)
						{
							_local2.ReportCollisionVsWorld(x, y, x / lenP, y / lenP, _local1);
							return(CollisionType.COL_AXIS);
						}
						else
						{
							_local2.ReportCollisionVsWorld(sx, sy, _local1.sx, _local1.sy, _local1);
							return(CollisionType.COL_OTHER);
						}
					}
				}
				else if ((signy * oV) < 0)
				{
					_local2.ReportCollisionVsWorld(0, y * oV, 0, oV, _local1);
					return(CollisionType.COL_AXIS);
				}
				else
				{
					var sx = _local1.sx;
					var sy = _local1.sy;
					var ox = (_local2.pos.x - (_local1.pos.x - (signx * _local1.xw)));
					var _local3 = _local2.pos.y - (_local1.pos.y + (oV * _local1.yw));
					var perp = ((ox * (-sy)) + (_local3 * sx));
					if (0 < ((perp * signx) * signy))
					{
						var len = Math.sqrt((ox * ox) + (_local3 * _local3));
						var pen = (_local2.r - len);
						if (0 < pen)
						{
							ox = ox / len;
							_local3 = _local3 / len;
							_local2.ReportCollisionVsWorld(ox * pen, _local3 * pen, ox, _local3, _local1);
							return(CollisionType.COL_OTHER);
						}
					}
					else
					{
						var dp = ((ox * sx) + (_local3 * sy));
						var pen = (_local2.r - Math.abs(dp));
						if (0 < pen)
						{
							_local2.ReportCollisionVsWorld(sx * pen, sy * pen, sx, sy, _local1);
							return(CollisionType.COL_OTHER);
						}
					}
				}
			}
			else if (oV == 0)
			{
				if ((signx * oH) < 0)
				{
					_local2.ReportCollisionVsWorld(x * oH, 0, oH, 0, _local1);
					return(CollisionType.COL_AXIS);
				}
				else
				{
					var sx = _local1.sx;
					var sy = _local1.sy;
					var ox = (_local2.pos.x - (_local1.pos.x + (oH * _local1.xw)));
					var _local3 = _local2.pos.y - (_local1.pos.y - (signy * _local1.yw));
					var perp = ((ox * (-sy)) + (_local3 * sx));
					if (((perp * signx) * signy) < 0)
					{
						var len = Math.sqrt((ox * ox) + (_local3 * _local3));
						var pen = (_local2.r - len);
						if (0 < pen)
						{
							ox = ox / len;
							_local3 = _local3 / len;
							_local2.ReportCollisionVsWorld(ox * pen, _local3 * pen, ox, _local3, _local1);
							return(CollisionType.COL_OTHER);
						}
					}
					else
					{
						var dp = ((ox * sx) + (_local3 * sy));
						var pen = (_local2.r - Math.abs(dp));
						if (0 < pen)
						{
							_local2.ReportCollisionVsWorld(sx * pen, sy * pen, sx, sy, _local1);
							return(CollisionType.COL_OTHER);
						}
					}
				}
			}
			else if (0 < ((signx * oH) + (signy * oV)))
			{
				return(CollisionType.COL_NONE);
			}
			else
			{
				var vx = (_local1.pos.x + (oH * _local1.xw));
				var vy = (_local1.pos.y + (oV * _local1.yw));
				var dx = (_local2.pos.x - vx);
				var dy = (_local2.pos.y - vy);
				var len = Math.sqrt((dx * dx) + (dy * dy));
				var pen = (_local2.r - len);
				if (0 < pen)
				{
					if (len == 0)
					{
						dx = oH / Math.SQRT2;
						dy = oV / Math.SQRT2;
					}
					else
					{
						dx = dx / len;
						dy = dy / len;
					}
					_local2.ReportCollisionVsWorld(dx * pen, dy * pen, dx, dy, _local1);
					return(CollisionType.COL_OTHER);
				}
			}
			return(CollisionType.COL_NONE);
			return(_local3);
		}

		private static function ProjCircle_Concave(x, y, oH, oV, obj, t):int
		{
			var _local1 = t;
			var _local2 = obj;
			var _local3 = oV;
			var signx = _local1.signx;
			var signy = _local1.signy;
			if (oH == 0)
			{
				if (_local3 == 0)
				{
					var ox = ((_local1.pos.x + (signx * _local1.xw)) - _local2.pos.x);
					var oy = ((_local1.pos.y + (signy * _local1.yw)) - _local2.pos.y);
					var twid = (_local1.xw * 2);
					var trad = Math.sqrt((twid * twid) + 0);
					var len = Math.sqrt((ox * ox) + (oy * oy));
					var pen = ((len + _local2.r) - trad);
					if (0 < pen)
					{
						var lenP:Number;
						if (x < y)
						{
							lenP = x;
							y = 0;
							if ((_local2.pos.x - _local1.pos.x) < 0)
							{
								x = x * -1;
							}
						}
						else
						{
							lenP = y;
							x = 0;
							if ((_local2.pos.y - _local1.pos.y) < 0)
							{
								y = y * -1;
							}
						}
						if (lenP < pen)
						{
							_local2.ReportCollisionVsWorld(x, y, x / lenP, y / lenP, _local1);
							return(CollisionType.COL_AXIS);
						}
						ox = ox / len;
						oy = oy / len;
						_local2.ReportCollisionVsWorld(ox * pen, oy * pen, ox, oy, _local1);
						return(CollisionType.COL_OTHER);
					}
					return(CollisionType.COL_NONE);
				}
				else if ((signy * _local3) < 0)
				{
					_local2.ReportCollisionVsWorld(0, y * _local3, 0, _local3, _local1);
					return(CollisionType.COL_AXIS);
				}
				else
				{
					var vx = (_local1.pos.x - (signx * _local1.xw));
					var vy = (_local1.pos.y + (_local3 * _local1.yw));
					var dx = (_local2.pos.x - vx);
					var dy = (_local2.pos.y - vy);
					var len = Math.sqrt((dx * dx) + (dy * dy));
					var pen = (_local2.r - len);
					if (0 < pen)
					{
						if (len == 0)
						{
							dx = 0;
							dy = _local3;
						}
						else
						{
							dx = dx / len;
							dy = dy / len;
						}
						_local2.ReportCollisionVsWorld(dx * pen, dy * pen, dx, dy, _local1);
						return(CollisionType.COL_OTHER);
					}
				}
			}
			else if (_local3 == 0)
			{
				if ((signx * oH) < 0)
				{
					_local2.ReportCollisionVsWorld(x * oH, 0, oH, 0, _local1);
					return(CollisionType.COL_AXIS);
				}
				else
				{
					var vx = (_local1.pos.x + (oH * _local1.xw));
					var vy = (_local1.pos.y - (signy * _local1.yw));
					var dx = (_local2.pos.x - vx);
					var dy = (_local2.pos.y - vy);
					var len = Math.sqrt((dx * dx) + (dy * dy));
					var pen = (_local2.r - len);
					if (0 < pen)
					{
						if (len == 0)
						{
							dx = oH;
							dy = 0;
						}
						else
						{
							dx = dx / len;
							dy = dy / len;
						}
						_local2.ReportCollisionVsWorld(dx * pen, dy * pen, dx, dy, _local1);
						return(CollisionType.COL_OTHER);
					}
				}
			}
			else if (0 < ((signx * oH) + (signy * _local3)))
			{
				return(CollisionType.COL_NONE);
			}
			else
			{
				var vx = (_local1.pos.x + (oH * _local1.xw));
				var vy = (_local1.pos.y + (_local3 * _local1.yw));
				var dx = (_local2.pos.x - vx);
				var dy = (_local2.pos.y - vy);
				var len = Math.sqrt((dx * dx) + (dy * dy));
				var pen = (_local2.r - len);
				if (0 < pen)
				{
					if (len == 0)
					{
						dx = oH / Math.SQRT2;
						dy = _local3 / Math.SQRT2;
					}
					else
					{
						dx = dx / len;
						dy = dy / len;
					}
					_local2.ReportCollisionVsWorld(dx * pen, dy * pen, dx, dy, _local1);
					return(CollisionType.COL_OTHER);
				}
			}
			return(CollisionType.COL_NONE);
			return(_local3);
		}

		private static function ProjCircle_Convex(x, y, oH, oV, obj, t):int
		{
			var _local1 = t;
			var _local2 = obj;
			var signx = _local1.signx;
			var signy = _local1.signy;
			if (oH == 0)
			{
				if (oV == 0)
				{
					var ox = (_local2.pos.x - (_local1.pos.x - (signx * _local1.xw)));
					var oy = (_local2.pos.y - (_local1.pos.y - (signy * _local1.yw)));
					var twid = (_local1.xw * 2);
					var trad = Math.sqrt((twid * twid) + 0);
					var len = Math.sqrt((ox * ox) + (oy * oy));
					var pen = ((trad + _local2.r) - len);
					if (0 < pen)
					{
						var lenP:Number;
						if (x < y)
						{
							lenP = x;
							y = 0;
							if ((_local2.pos.x - _local1.pos.x) < 0)
							{
								x = x * -1;
							}
						}
						else
						{
							lenP = y;
							x = 0;
							if ((_local2.pos.y - _local1.pos.y) < 0)
							{
								y = y * -1;
							}
						}
						if (lenP < pen)
						{
							_local2.ReportCollisionVsWorld(x, y, x / lenP, y / lenP, _local1);
							return(CollisionType.COL_AXIS);
						}
						else
						{
							ox = ox / len;
							oy = oy / len;
							_local2.ReportCollisionVsWorld(ox * pen, oy * pen, ox, oy, _local1);
							return(CollisionType.COL_OTHER);
						}
					}
				}
				else if ((signy * oV) < 0)
				{
					_local2.ReportCollisionVsWorld(0, y * oV, 0, oV, _local1);
					return(CollisionType.COL_AXIS);
				}
				else
				{
					var ox = (_local2.pos.x - (_local1.pos.x - (signx * _local1.xw)));
					var oy = (_local2.pos.y - (_local1.pos.y - (signy * _local1.yw)));
					var twid = (_local1.xw * 2);
					var trad = Math.sqrt((twid * twid) + 0);
					var len = Math.sqrt((ox * ox) + (oy * oy));
					var pen = ((trad + _local2.r) - len);
					if (0 < pen)
					{
						ox = ox / len;
						oy = oy / len;
						_local2.ReportCollisionVsWorld(ox * pen, oy * pen, ox, oy, _local1);
						return(CollisionType.COL_OTHER);
					}
				}
			}
			else if (oV == 0)
			{
				if ((signx * oH) < 0)
				{
					_local2.ReportCollisionVsWorld(x * oH, 0, oH, 0, _local1);
					return(CollisionType.COL_AXIS);
				}
				else
				{
					var ox = (_local2.pos.x - (_local1.pos.x - (signx * _local1.xw)));
					var oy = (_local2.pos.y - (_local1.pos.y - (signy * _local1.yw)));
					var twid = (_local1.xw * 2);
					var trad = Math.sqrt((twid * twid) + 0);
					var len = Math.sqrt((ox * ox) + (oy * oy));
					var pen = ((trad + _local2.r) - len);
					if (0 < pen)
					{
						ox = ox / len;
						oy = oy / len;
						_local2.ReportCollisionVsWorld(ox * pen, oy * pen, ox, oy, _local1);
						return(CollisionType.COL_OTHER);
					}
				}
			}
			else if (0 < ((signx * oH) + (signy * oV)))
			{
				var ox = (_local2.pos.x - (_local1.pos.x - (signx * _local1.xw)));
				var oy = (_local2.pos.y - (_local1.pos.y - (signy * _local1.yw)));
				var twid = (_local1.xw * 2);
				var trad = Math.sqrt((twid * twid) + 0);
				var len = Math.sqrt((ox * ox) + (oy * oy));
				var pen = ((trad + _local2.r) - len);
				if (0 < pen)
				{
					ox = ox / len;
					oy = oy / len;
					_local2.ReportCollisionVsWorld(ox * pen, oy * pen, ox, oy, _local1);
					return(CollisionType.COL_OTHER);
				}
			}
			else
			{
				var vx = (_local1.pos.x + (oH * _local1.xw));
				var vy = (_local1.pos.y + (oV * _local1.yw));
				var dx = (_local2.pos.x - vx);
				var _local3 = _local2.pos.y - vy;
				var len = Math.sqrt((dx * dx) + (_local3 * _local3));
				var pen = (_local2.r - len);
				if (0 < pen)
				{
					if (len == 0)
					{
						dx = oH / Math.SQRT2;
						_local3 = oV / Math.SQRT2;
					}
					else
					{
						dx = dx / len;
						_local3 = _local3 / len;
					}
					_local2.ReportCollisionVsWorld(dx * pen, _local3 * pen, dx, _local3, _local1);
					return(CollisionType.COL_OTHER);
				}
			}
			return(CollisionType.COL_NONE);
			return(_local3);
		}

		private static function ProjCircle_22DegS(x, y, oH, oV, obj, t):int
		{
			var _local1 = t;
			var _local2 = obj;
			var signx = _local1.signx;
			var signy = _local1.signy;
			if (0 < (signy * oV))
			{
				return(CollisionType.COL_NONE);
			}
			else if (oH == 0)
			{
				if (oV == 0)
				{
					var sx = _local1.sx;
					var sy = _local1.sy;
					var r = _local2.r;
					var ox = (_local2.pos.x - (_local1.pos.x - (signx * _local1.xw)));
					var _local3 = _local2.pos.y - _local1.pos.y;
					var perp = ((ox * (-sy)) + (_local3 * sx));
					if (0 < ((perp * signx) * signy))
					{
						var len = Math.sqrt((ox * ox) + (_local3 * _local3));
						var pen = (r - len);
						if (0 < pen)
						{
							ox = ox / len;
							_local3 = _local3 / len;
							_local2.ReportCollisionVsWorld(ox * pen, _local3 * pen, ox, _local3, _local1);
							return(CollisionType.COL_OTHER);
						}
					}
					else
					{
						ox = ox - (r * sx);
						_local3 = _local3 - (r * sy);
						var dp = ((ox * sx) + (_local3 * sy));
						if (dp < 0)
						{
							sx = sx * (-dp);
							sy = sy * (-dp);
							var lenN = Math.sqrt((sx * sx) + (sy * sy));
							var lenP:Number;
							if (x < y)
							{
								lenP = x;
								y = 0;
								if ((_local2.pos.x - _local1.pos.x) < 0)
								{
									x = x * -1;
								}
							}
							else
							{
								lenP = y;
								x = 0;
								if ((_local2.pos.y - _local1.pos.y) < 0)
								{
									y = y * -1;
								}
							}
							if (lenP < lenN)
							{
								_local2.ReportCollisionVsWorld(x, y, x / lenP, y / lenP, _local1);
								return(CollisionType.COL_AXIS);
							}
							else
							{
								_local2.ReportCollisionVsWorld(sx, sy, _local1.sx, _local1.sy, _local1);
								return(CollisionType.COL_OTHER);
							}
						}
					}
				}
				else
				{
					_local2.ReportCollisionVsWorld(0, y * oV, 0, oV, _local1);
					return(CollisionType.COL_AXIS);
				}
			}
			else if (oV == 0)
			{
				if ((signx * oH) < 0)
				{
					var vx = (_local1.pos.x - (signx * _local1.xw));
					var vy = _local1.pos.y;
					var dx = (_local2.pos.x - vx);
					var dy = (_local2.pos.y - vy);
					if ((dy * signy) < 0)
					{
						_local2.ReportCollisionVsWorld(x * oH, 0, oH, 0, _local1);
						return(CollisionType.COL_AXIS);
					}
					else
					{
						var len = Math.sqrt((dx * dx) + (dy * dy));
						var pen = (_local2.r - len);
						if (0 < pen)
						{
							if (len == 0)
							{
								dx = oH / Math.SQRT2;
								dy = oV / Math.SQRT2;
							}
							else
							{
								dx = dx / len;
								dy = dy / len;
							}
							_local2.ReportCollisionVsWorld(dx * pen, dy * pen, dx, dy, _local1);
							return(CollisionType.COL_OTHER);
						}
					}
				}
				else
				{
					var sx = _local1.sx;
					var sy = _local1.sy;
					var ox = (_local2.pos.x - (_local1.pos.x + (oH * _local1.xw)));
					var _local3 = _local2.pos.y - (_local1.pos.y - (signy * _local1.yw));
					var perp = ((ox * (-sy)) + (_local3 * sx));
					if (((perp * signx) * signy) < 0)
					{
						var len = Math.sqrt((ox * ox) + (_local3 * _local3));
						var pen = (_local2.r - len);
						if (0 < pen)
						{
							ox = ox / len;
							_local3 = _local3 / len;
							_local2.ReportCollisionVsWorld(ox * pen, _local3 * pen, ox, _local3, _local1);
							return(CollisionType.COL_OTHER);
						}
					}
					else
					{
						var dp = ((ox * sx) + (_local3 * sy));
						var pen = (_local2.r - Math.abs(dp));
						if (0 < pen)
						{
							_local2.ReportCollisionVsWorld(sx * pen, sy * pen, sx, sy, _local1);
							return(CollisionType.COL_OTHER);
						}
					}
				}
			}
			else
			{
				var vx = (_local1.pos.x + (oH * _local1.xw));
				var vy = (_local1.pos.y + (oV * _local1.yw));
				var dx = (_local2.pos.x - vx);
				var dy = (_local2.pos.y - vy);
				var len = Math.sqrt((dx * dx) + (dy * dy));
				var pen = (_local2.r - len);
				if (0 < pen)
				{
					if (len == 0)
					{
						dx = oH / Math.SQRT2;
						dy = oV / Math.SQRT2;
					}
					else
					{
						dx = dx / len;
						dy = dy / len;
					}
					_local2.ReportCollisionVsWorld(dx * pen, dy * pen, dx, dy, _local1);
					return(CollisionType.COL_OTHER);
				}
			}
			return(CollisionType.COL_NONE);
			return(_local3);
		}

		private static function ProjCircle_22DegB(x, y, oH, oV, obj, t):int
		{
			var _local1 = t;
			var _local2 = obj;
			var signx = _local1.signx;
			var _local3 = _local1.signy;
			if (oH == 0)
			{
				if (oV == 0)
				{
					var sx = _local1.sx;
					var sy = _local1.sy;
					var r = _local2.r;
					var ox = ((_local2.pos.x - (sx * r)) - (_local1.pos.x - (signx * _local1.xw)));
					var oy = ((_local2.pos.y - (sy * r)) - (_local1.pos.y + (_local3 * _local1.yw)));
					var dp = ((ox * sx) + (oy * sy));
					if (dp < 0)
					{
						sx = sx * (-dp);
						sy = sy * (-dp);
						var lenN = Math.sqrt((sx * sx) + (sy * sy));
						var lenP:Number;
						if (x < y)
						{
							lenP = x;
							y = 0;
							if ((_local2.pos.x - _local1.pos.x) < 0)
							{
								x = x * -1;
							}
						}
						else
						{
							lenP = y;
							x = 0;
							if ((_local2.pos.y - _local1.pos.y) < 0)
							{
								y = y * -1;
							}
						}
						if (lenP < lenN)
						{
							_local2.ReportCollisionVsWorld(x, y, x / lenP, y / lenP, _local1);
							return(CollisionType.COL_AXIS);
						}
						else
						{
							_local2.ReportCollisionVsWorld(sx, sy, _local1.sx, _local1.sy, _local1);
							return(CollisionType.COL_OTHER);
						}
					}
				}
				else if ((_local3 * oV) < 0)
				{
					_local2.ReportCollisionVsWorld(0, y * oV, 0, oV, _local1);
					return(CollisionType.COL_AXIS);
				}
				else
				{
					var sx = _local1.sx;
					var sy = _local1.sy;
					var ox = (_local2.pos.x - (_local1.pos.x - (signx * _local1.xw)));
					var oy = (_local2.pos.y - (_local1.pos.y + (_local3 * _local1.yw)));
					var perp = ((ox * (-sy)) + (oy * sx));
					if (0 < ((perp * signx) * _local3))
					{
						var len = Math.sqrt((ox * ox) + (oy * oy));
						var pen = (_local2.r - len);
						if (0 < pen)
						{
							ox = ox / len;
							oy = oy / len;
							_local2.ReportCollisionVsWorld(ox * pen, oy * pen, ox, oy, _local1);
							return(CollisionType.COL_OTHER);
						}
					}
					else
					{
						var dp = ((ox * sx) + (oy * sy));
						var pen = (_local2.r - Math.abs(dp));
						if (0 < pen)
						{
							_local2.ReportCollisionVsWorld(sx * pen, sy * pen, sx, sy, _local1);
							return(CollisionType.COL_OTHER);
						}
					}
				}
			}
			else if (oV == 0)
			{
				if ((signx * oH) < 0)
				{
					_local2.ReportCollisionVsWorld(x * oH, 0, oH, 0, _local1);
					return(CollisionType.COL_AXIS);
				}
				else
				{
					var ox = (_local2.pos.x - (_local1.pos.x + (signx * _local1.xw)));
					var oy = (_local2.pos.y - _local1.pos.y);
					if ((oy * _local3) < 0)
					{
						_local2.ReportCollisionVsWorld(x * oH, 0, oH, 0, _local1);
						return(CollisionType.COL_AXIS);
					}
					else
					{
						var sx = _local1.sx;
						var sy = _local1.sy;
						var perp = ((ox * (-sy)) + (oy * sx));
						if (((perp * signx) * _local3) < 0)
						{
							var len = Math.sqrt((ox * ox) + (oy * oy));
							var pen = (_local2.r - len);
							if (0 < pen)
							{
								ox = ox / len;
								oy = oy / len;
								_local2.ReportCollisionVsWorld(ox * pen, oy * pen, ox, oy, _local1);
								return(CollisionType.COL_OTHER);
							}
						}
						else
						{
							var dp = ((ox * sx) + (oy * sy));
							var pen = (_local2.r - Math.abs(dp));
							if (0 < pen)
							{
								_local2.ReportCollisionVsWorld(sx * pen, sy * pen, _local1.sx, _local1.sy, _local1);
								return(CollisionType.COL_OTHER);
							}
						}
					}
				}
			}
			else if (0 < ((signx * oH) + (_local3 * oV)))
			{
				var slen = 2.23606797749979;
				var sx = ((signx * 1) / slen);
				var sy = ((_local3 * 2) / slen);
				var r = _local2.r;
				var ox = ((_local2.pos.x - (sx * r)) - (_local1.pos.x - (signx * _local1.xw)));
				var oy = ((_local2.pos.y - (sy * r)) - (_local1.pos.y + (_local3 * _local1.yw)));
				var dp = ((ox * sx) + (oy * sy));
				if (dp < 0)
				{
					_local2.ReportCollisionVsWorld((-sx) * dp, (-sy) * dp, _local1.sx, _local1.sy, _local1);
					return(CollisionType.COL_OTHER);
				}
				return(CollisionType.COL_NONE);
			}
			else
			{
				var vx = (_local1.pos.x + (oH * _local1.xw));
				var vy = (_local1.pos.y + (oV * _local1.yw));
				var dx = (_local2.pos.x - vx);
				var dy = (_local2.pos.y - vy);
				var len = Math.sqrt((dx * dx) + (dy * dy));
				var pen = (_local2.r - len);
				if (0 < pen)
				{
					if (len == 0)
					{
						dx = oH / Math.SQRT2;
						dy = oV / Math.SQRT2;
					}
					else
					{
						dx = dx / len;
						dy = dy / len;
					}
					_local2.ReportCollisionVsWorld(dx * pen, dy * pen, dx, dy, _local1);
					return(CollisionType.COL_OTHER);
				}
			}
			return(CollisionType.COL_NONE);
			return(_local3);
		}

		private static function ProjCircle_67DegS(x, y, oH, oV, obj, t):int
		{
			var _local1 = t;
			var _local2 = obj;
			var signx = _local1.signx;
			var signy = _local1.signy;
			if (0 < (signx * oH))
			{
				return(CollisionType.COL_NONE);
			}
			else if (oH == 0)
			{
				if (oV == 0)
				{
					var sx = _local1.sx;
					var sy = _local1.sy;
					var r = _local2.r;
					var ox = (_local2.pos.x - _local1.pos.x);
					var _local3 = _local2.pos.y - (_local1.pos.y - (signy * _local1.yw));
					var perp = ((ox * (-sy)) + (_local3 * sx));
					if (((perp * signx) * signy) < 0)
					{
						var len = Math.sqrt((ox * ox) + (_local3 * _local3));
						var pen = (r - len);
						if (0 < pen)
						{
							ox = ox / len;
							_local3 = _local3 / len;
							_local2.ReportCollisionVsWorld(ox * pen, _local3 * pen, ox, _local3, _local1);
							return(CollisionType.COL_OTHER);
						}
					}
					else
					{
						ox = ox - (r * sx);
						_local3 = _local3 - (r * sy);
						var dp = ((ox * sx) + (_local3 * sy));
						if (dp < 0)
						{
							sx = sx * (-dp);
							sy = sy * (-dp);
							var lenN = Math.sqrt((sx * sx) + (sy * sy));
							var lenP:Number;
							if (x < y)
							{
								lenP = x;
								y = 0;
								if ((_local2.pos.x - _local1.pos.x) < 0)
								{
									x = x * -1;
								}
							}
							else
							{
								lenP = y;
								x = 0;
								if ((_local2.pos.y - _local1.pos.y) < 0)
								{
									y = y * -1;
								}
							}
							if (lenP < lenN)
							{
								_local2.ReportCollisionVsWorld(x, y, x / lenP, y / lenP, _local1);
								return(CollisionType.COL_AXIS);
							}
							else
							{
								_local2.ReportCollisionVsWorld(sx, sy, _local1.sx, _local1.sy, _local1);
								return(CollisionType.COL_OTHER);
							}
						}
					}
				}
				else if ((signy * oV) < 0)
				{
					var vx = _local1.pos.x;
					var vy = (_local1.pos.y - (signy * _local1.yw));
					var dx = (_local2.pos.x - vx);
					var dy = (_local2.pos.y - vy);
					if ((dx * signx) < 0)
					{
						_local2.ReportCollisionVsWorld(0, y * oV, 0, oV, _local1);
						return(CollisionType.COL_AXIS);
					}
					else
					{
						var len = Math.sqrt((dx * dx) + (dy * dy));
						var pen = (_local2.r - len);
						if (0 < pen)
						{
							if (len == 0)
							{
								dx = oH / Math.SQRT2;
								dy = oV / Math.SQRT2;
							}
							else
							{
								dx = dx / len;
								dy = dy / len;
							}
							_local2.ReportCollisionVsWorld(dx * pen, dy * pen, dx, dy, _local1);
							return(CollisionType.COL_OTHER);
						}
					}
				}
				else
				{
					var sx = _local1.sx;
					var sy = _local1.sy;
					var ox = (_local2.pos.x - (_local1.pos.x - (signx * _local1.xw)));
					var _local3 = _local2.pos.y - (_local1.pos.y + (oV * _local1.yw));
					var perp = ((ox * (-sy)) + (_local3 * sx));
					if (0 < ((perp * signx) * signy))
					{
						var len = Math.sqrt((ox * ox) + (_local3 * _local3));
						var pen = (_local2.r - len);
						if (0 < pen)
						{
							ox = ox / len;
							_local3 = _local3 / len;
							_local2.ReportCollisionVsWorld(ox * pen, _local3 * pen, ox, _local3, _local1);
							return(CollisionType.COL_OTHER);
						}
					}
					else
					{
						var dp = ((ox * sx) + (_local3 * sy));
						var pen = (_local2.r - Math.abs(dp));
						if (0 < pen)
						{
							_local2.ReportCollisionVsWorld(sx * pen, sy * pen, _local1.sx, _local1.sy, _local1);
							return(CollisionType.COL_OTHER);
						}
					}
				}
			}
			else if (oV == 0)
			{
				_local2.ReportCollisionVsWorld(x * oH, 0, oH, 0, _local1);
				return(CollisionType.COL_AXIS);
			}
			else
			{
				var vx = (_local1.pos.x + (oH * _local1.xw));
				var vy = (_local1.pos.y + (oV * _local1.yw));
				var dx = (_local2.pos.x - vx);
				var dy = (_local2.pos.y - vy);
				var len = Math.sqrt((dx * dx) + (dy * dy));
				var pen = (_local2.r - len);
				if (0 < pen)
				{
					if (len == 0)
					{
						dx = oH / Math.SQRT2;
						dy = oV / Math.SQRT2;
					}
					else
					{
						dx = dx / len;
						dy = dy / len;
					}
					_local2.ReportCollisionVsWorld(dx * pen, dy * pen, dx, dy, _local1);
					return(CollisionType.COL_OTHER);
				}
			}
			return(CollisionType.COL_NONE);
			return(_local3);
		}

		private static function ProjCircle_67DegB(x, y, oH, oV, obj, t):int
		{
			var _local1 = t;
			var _local2 = obj;
			var signx = _local1.signx;
			var _local3 = _local1.signy;
			if (oH == 0)
			{
				if (oV == 0)
				{
					var sx = _local1.sx;
					var sy = _local1.sy;
					var r = _local2.r;
					var ox = ((_local2.pos.x - (sx * r)) - (_local1.pos.x + (signx * _local1.xw)));
					var oy = ((_local2.pos.y - (sy * r)) - (_local1.pos.y - (_local3 * _local1.yw)));
					var dp = ((ox * sx) + (oy * sy));
					if (dp < 0)
					{
						sx = sx * (-dp);
						sy = sy * (-dp);
						var lenN = Math.sqrt((sx * sx) + (sy * sy));
						var lenP:Number;
						if (x < y)
						{
							lenP = x;
							y = 0;
							if ((_local2.pos.x - _local1.pos.x) < 0)
							{
								x = x * -1;
							}
						}
						else
						{
							lenP = y;
							x = 0;
							if ((_local2.pos.y - _local1.pos.y) < 0)
							{
								y = y * -1;
							}
						}
						if (lenP < lenN)
						{
							_local2.ReportCollisionVsWorld(x, y, x / lenP, y / lenP, _local1);
							return(CollisionType.COL_AXIS);
						}
						else
						{
							_local2.ReportCollisionVsWorld(sx, sy, _local1.sx, _local1.sy, _local1);
							return(CollisionType.COL_OTHER);
						}
					}
				}
				else if ((_local3 * oV) < 0)
				{
					_local2.ReportCollisionVsWorld(0, y * oV, 0, oV, _local1);
					return(CollisionType.COL_AXIS);
				}
				else
				{
					var ox = (_local2.pos.x - _local1.pos.x);
					var oy = (_local2.pos.y - (_local1.pos.y + (_local3 * _local1.yw)));
					if ((ox * signx) < 0)
					{
						_local2.ReportCollisionVsWorld(0, y * oV, 0, oV, _local1);
						return(CollisionType.COL_AXIS);
					}
					else
					{
						var sx = _local1.sx;
						var sy = _local1.sy;
						var perp = ((ox * (-sy)) + (oy * sx));
						if (0 < ((perp * signx) * _local3))
						{
							var len = Math.sqrt((ox * ox) + (oy * oy));
							var pen = (_local2.r - len);
							if (0 < pen)
							{
								ox = ox / len;
								oy = oy / len;
								_local2.ReportCollisionVsWorld(ox * pen, oy * pen, ox, oy, _local1);
								return(CollisionType.COL_OTHER);
							}
						}
						else
						{
							var dp = ((ox * sx) + (oy * sy));
							var pen = (_local2.r - Math.abs(dp));
							if (0 < pen)
							{
								_local2.ReportCollisionVsWorld(sx * pen, sy * pen, sx, sy, _local1);
								return(CollisionType.COL_OTHER);
							}
						}
					}
				}
			}
			else if (oV == 0)
			{
				if ((signx * oH) < 0)
				{
					_local2.ReportCollisionVsWorld(x * oH, 0, oH, 0, _local1);
					return(CollisionType.COL_AXIS);
				}
				else
				{
					var slen = 2.23606797749979;
					var sx = ((signx * 2) / slen);
					var sy = ((_local3 * 1) / slen);
					var ox = (_local2.pos.x - (_local1.pos.x + (signx * _local1.xw)));
					var oy = (_local2.pos.y - (_local1.pos.y - (_local3 * _local1.yw)));
					var perp = ((ox * (-sy)) + (oy * sx));
					if (((perp * signx) * _local3) < 0)
					{
						var len = Math.sqrt((ox * ox) + (oy * oy));
						var pen = (_local2.r - len);
						if (0 < pen)
						{
							ox = ox / len;
							oy = oy / len;
							_local2.ReportCollisionVsWorld(ox * pen, oy * pen, ox, oy, _local1);
							return(CollisionType.COL_OTHER);
						}
					}
					else
					{
						var dp = ((ox * sx) + (oy * sy));
						var pen = (_local2.r - Math.abs(dp));
						if (0 < pen)
						{
							_local2.ReportCollisionVsWorld(sx * pen, sy * pen, _local1.sx, _local1.sy, _local1);
							return(CollisionType.COL_OTHER);
						}
					}
				}
			}
			else if (0 < ((signx * oH) + (_local3 * oV)))
			{
				var sx = _local1.sx;
				var sy = _local1.sy;
				var r = _local2.r;
				var ox = ((_local2.pos.x - (sx * r)) - (_local1.pos.x + (signx * _local1.xw)));
				var oy = ((_local2.pos.y - (sy * r)) - (_local1.pos.y - (_local3 * _local1.yw)));
				var dp = ((ox * sx) + (oy * sy));
				if (dp < 0)
				{
					_local2.ReportCollisionVsWorld((-sx) * dp, (-sy) * dp, _local1.sx, _local1.sy, _local1);
					return(CollisionType.COL_OTHER);
				}
				return(CollisionType.COL_NONE);
			}
			else
			{
				var vx = (_local1.pos.x + (oH * _local1.xw));
				var vy = (_local1.pos.y + (oV * _local1.yw));
				var dx = (_local2.pos.x - vx);
				var dy = (_local2.pos.y - vy);
				var len = Math.sqrt((dx * dx) + (dy * dy));
				var pen = (_local2.r - len);
				if (0 < pen)
				{
					if (len == 0)
					{
						dx = oH / Math.SQRT2;
						dy = oV / Math.SQRT2;
					}
					else
					{
						dx = dx / len;
						dy = dy / len;
					}
					_local2.ReportCollisionVsWorld(dx * pen, dy * pen, dx, dy, _local1);
					return(CollisionType.COL_OTHER);
				}
			}
			return(CollisionType.COL_NONE);
			return(_local3);
		}
	}
}